package com.qfedu.openplateform.manager.service.impl;

import com.qfedu.openplateform.manager.dao.TokenMapper;
import com.qfedu.openplateform.manager.entity.UserToken;
import com.qfedu.openplateform.manager.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TokenServiceImpl implements TokenService {

    @Autowired
    private TokenMapper tokenMapper;

    @Override
    public List<UserToken> getTokenAll() {
        return tokenMapper.getTokenAll();
    }

    @Override
    public int updateToken(UserToken userToken) {
        return tokenMapper.updateToken(userToken);
    }

    @Override
    public List<UserToken> getTokenByAccessToken(String accessToken) {
        return tokenMapper.getTokenByAccessToken(accessToken);
    }
}
